package com.example.questionsystem.modules.qu.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.questionsystem.modules.qu.Vo.QuestionVO;
import com.example.questionsystem.modules.qu.dto.QuestionDTO;
import com.example.questionsystem.modules.qu.entity.Projects;
import com.example.questionsystem.modules.qu.entity.QuestionBanks;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface QuestionBankMapper extends BaseMapper<QuestionBanks> {

    List<QuestionBanks> getQuestionBanksBySubjectId(String subjectId);

    Page<QuestionVO> searchQuestions(@Param("page") IPage<QuestionVO> page, @Param("ew") QueryWrapper<QuestionVO> wrapper);
    List<Map<String, Object>> countQuestionsByKnowledge(String subjectId);
}